package zhishu.iceyyy.com.bxq_2500.activity;

//import android.app.Activity;
//import android.content.Intent;
//import android.os.Bundle;
//import android.view.View;
//import android.widget.ImageView;
//import android.widget.LinearLayout;
//import android.widget.RelativeLayout;
//import android.widget.TextView;
//import android.widget.Toast;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.github.czy1121.view.RoundButton;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import de.greenrobot.event.EventBus;
import zhishu.iceyyy.com.bxq_2500.R;
import zhishu.iceyyy.com.bxq_2500.bean.MyEvent;
import zhishu.iceyyy.com.bxq_2500.utils.SpfUtils;


/**
 * Created by 智江鹏 on 2016/11/18.
 * 设置页面
 */
public class Setting_Activity extends Activity {


    @BindView(R.id.textView11)
    TextView textView11;
    @BindView(R.id.imageView15)
    ImageView imageView15;
    @BindView(R.id.layout_help)
    RelativeLayout layoutHelp;
    @BindView(R.id.textView12)
    TextView textView12;
    @BindView(R.id.imageView16)
    ImageView imageView16;
    @BindView(R.id.tv_bb)
    TextView tvBb;
    @BindView(R.id.imageView18)
    ImageView imageView18;
    @BindView(R.id.logout)
    RoundButton logout;
    @BindView(R.id.activity_seetting)
    LinearLayout activitySeetting;
    @BindView(R.id.layout_about)
    RelativeLayout layoutAbout;
    @BindView(R.id.layout_grzx)
    RelativeLayout layoutGrzx;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_1_seetting);
        ButterKnife.bind(this);

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }


    @OnClick({R.id.img_back, R.id.layout_help, R.id.layout_about, R.id.layout_grzx, R.id.logout})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.img_back:
                finish();
                break;
            case R.id.layout_help:
                startActivity(new Intent(this, Help_Activity.class));
                break;
            case R.id.layout_about:
                startActivity(new Intent(this, About_Activity.class));
                break;
            case R.id.layout_grzx:
                 startActivity(new Intent(this, Feedback_Activity.class));
                break;
            case R.id.logout:

                SpfUtils.put(this, "islogin", false);
                Toast.makeText(this, "退出成功！", Toast.LENGTH_SHORT).show();
                MyEvent myEvent=new MyEvent();
                myEvent.setContent("finish");
                EventBus.getDefault().post(myEvent);
                finish();


                break;
        }
    }
}



